﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dtyo.Master" AutoEventWireup="true" CodeBehind="DepList.aspx.cs" Inherits="Dtyo_WebRole.Dep.DepList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3>Department List</h3>
    
        <form id="addDepartmentForm" action="">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
    </div>      
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <ul>
                <asp:DataList ID="DepartmentList" runat="server" DataSourceID="DepartmentListDataSource">
                    <ItemTemplate>
                         <li><a href="DepDetails.aspx?rowkey<%# "=" + Eval("Rowkey") %>"> <%# Eval("Name") %></li>
                    </ItemTemplate>
                </asp:DataList>
            <asp:Timer ID="Timer1" runat="server" Interval="15000" OnTick="Timer1_Tick">
            </asp:Timer>
            </ul>
        </ContentTemplate>
    </asp:UpdatePanel>
    <h3>Add Department</h3>
    <table>
        <tr>
            <td>Name: </td>
            <td><asp:TextBox ID="txtName" runat="server" /></td>
        </tr>
        <tr>
            <td>Description: </td>
            <td><asp:TextBox ID="txtDescription" runat="server" /></td>
        </tr>
        <tr>
            <td></td>
            <td><asp:Button ID="AddDepartmentButton" runat="server" OnClick="SaveDepartmentButton_Click" Text="Save" /><input type="reset" value="Cancel" /></td>
        </tr>
    </table>

    </form>
   
    <a href="../Index.aspx">Pääsivu</a>
</asp:Content>
